<template>
  <div id="app">
    <!--绑定函数给子组件数据?-->
     <v-header :seller="seller"></v-header>
     <div class="tab border-1px">
       <div class="tba-item"><router-link to="/goods">商品</router-link></div>
       <div class="tba-item"><router-link to="/ratings">评论</router-link></div>
       <div class="tba-item"><router-link to="/seller">商家</router-link></div>
     </div>
    <router-view :seller="seller"></router-view>
  </div>
</template>

<script>
import header from './components/header/header.vue'
export default {
  data () {
    return {
      seller: {}
    }
  },
  created () {
    //发送 gat 请求 获取头部信息
    this.$http.get('http://cspc.cqmbyy.cn/api/seller/').then((lefgg) => {
        this.seller=lefgg.body
    })
  },
  components: {
    'v-header': header
  }
}
</script>

<style lang="stylus">
.tab
  display: flex
  width: 100%
  line-height: 40px
  .tba-item
    box-flex: 1
    flex: 1
    text-align: center
    &> a
      display: block
      font-size:14px
      color:rgb(77,85,93)
      &.actiond
        color:#f01414
</style>
